home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 36 / dvmon13.zip / DVMON.DOC < prev    next >
Text File  |  1988-05-16  |  8KB  |  175 lines

  1.  
  2.  
  3.       DVMON Version 1.1 - A CPU PERFORMANCE MONITOR FOR DESQVIEW
  4.  
  5.  
  6.  
  7.       Written By: Barry A. Burke                             May, 1988
  8.  
  9.       Copyright 1988 Barry A. Burke. All rights, except those
  10.       specifically granted herein are reserved by the author. The right
  11.       to copy and distribute this material is granted without fee for
  12.       any and all non-commercial use. This material specifically may
  13.       not be distributed or sold for a fee nor incorporated in whole or
  14.       in part into any other product that is distributed or sold for a
  15.       fee without specific permission of the author. To obtain special
  16.       permission or to report any difficulties with this material
  17.       contact:
  18.                         Barry A. Burke
  19.             Marketing Insights
  20.                         35 Elizabeth Circle
  21.                         Framingham, MA  01701
  22.  
  23.       THIS MATERIAL IS DISTRIBUTED "as is" WITHOUT ANY EXPRESSED OR
  24.       IMPLIED WARRANTY OR LIABILITY FOR DIRECT, INDIRECT OR
  25.       CONSEQUENTIAL DAMAGES.
  26.  
  27.  
  28.       OVERVIEW
  29.  
  30.       DVMON is a simple CPU performance monitor for use with DESQview 2.01
  31.       and later. DVMON calculates the amount of CPU that is UNUSED by all
  32.       running applications and displays this percentage along with the
  33.       current date/time once a second. DVMON can be used to isolate programs
  34.       that are not DESQview-aware so that you can either a) correct them by
  35.       adding DVPAUSE calls (where applicable) or b) reduce timeslices so as to
  36.       minimize impact on other applications.
  37.  
  38.       REVISION HISTORY
  39.  
  40.       Revision 1.0 (actually, it had no Rev Number) - original version sent
  41.       to the Quarterdeck BBoard on May 13, 1988.
  42.  
  43.       Revision 1.1 - May 16, 1988.  Fixed bug with bell ringing. Decided not
  44.       to run in DvCritical mode, and a side effect is that I can't make the
  45.       bell screw up anymore. Minor code changes to reflect removal of
  46.       Critical code. Added a makefile.
  47.       
  48.  
  49.       PROGRAM INFORMATION
  50.  
  51.       DVMON requires only 9K of memory to run. TurboC source and a PIF file
  52.       are included in this ARC file.
  53.       
  54.       DVMON is written in C for Turbo C Version 1.5, but also requires MASM
  55.       since some in-line assembly is used to minimize memory requirements.
  56.       If it is recompiled you should use the small model for minimum size. I
  57.       used the following command line options:
  58.  
  59.               tcc -O -Z -G -M -B -f- dvmon.c
  60.  
  61.       DVMON uses a very simplistic approach in determining the amount of
  62.       UNUSED CPU in your system. When it starts up, it runs a tight loop to
  63.       count the number of times it can get serviced in 18 ticks. Thereafter,
  64.       it counts the number of times it gets the CPU for each 18 ticks,
  65.       calculates a percentage over the original count, and displays the
  66.       current date/time and percentage in the first two lines of a window.
  67.  
  68.       For best results, DVMON should be started with no other open windows
  69.       so that it's calibration loop is most accurate. On my 386 system, I
  70.       start DVMON in the DESQview !Startup script as the SECOND program (A
  71.       large DOS window is first so that it gets the maximum available
  72.       memory). On my 286 with LIM 4.0, I start DVMON (from !Startup) as the
  73.       FIRST program, so that it gets it's memory allocated so that it can
  74.       run no matter what else is running (CAN BE SWAPPED = N -- see
  75.       installation notes below).
  76.  
  77.  
  78.       In both it's calibration loop and it's monitor loop, DVMON DV_PAUSE's
  79.       after every increment. This assures the most accurate numbers possible
  80.       without reducing the total amount of CPU available by (background
  81.       timeslice time). If a program wants/needs all available CPU, DVMON
  82.       will in fact report "0% CPU Unused". On a 16MHz 386, DVMON imposes
  83.       about a 3% CPU overhead (it never reports more than 97% Unused) --
  84.       this number is supported by the difference in the Norton 4 SI numbers
  85.       for this system under DOS and under DESQview. On a 10MHz 286, the
  86.       overhead is 4-5%.
  87.  
  88.       DVMON uses only DOS and BIOS calls for it's I/O operations.
  89.  
  90.       You can change the monitor/update frequency at the #define INCRSECS
  91.       line. If you want a full Turbo C DV library, remove the lines
  92.       surrounded by #ifdef NOTDEF.
  93.  
  94.       KNOWN PROBLEMS
  95.  
  96.       If you do start DVMON from your !Startup, take care not to type
  97.       anything until after DVMON is done calibrating. Otherwise you might
  98.       start seeing the %CPU Unused exceed 100% because of the effect of your
  99.       keystrokes on the calibration loop.
  100.  
  101.       By definition, any performance monitor running on the same CPU will
  102.       reduce performance somewhat. I have made every effort to minimize this
  103.       effect, but it's not perfect. I figure a 3 or 4% reduction is worth it
  104.       to be able to uncover those nasty CPU hogs that simply poll for
  105.       keyboard input.
  106.  
  107.       I originally wrote DVMON to see what difference fixing JOVE 4.9 to be
  108.       DESQview aware would make. On my 386 (w 5Meg of QEMM 4.1 LIM memory,
  109.       no less!), running original Jove, DVMON reported 0% CPU Unused. This
  110.       is because Jove was in a keyboard poll/mode line update loop when
  111.       idle. I added a DV_PAUSE to the idle loop, and DVMON reported 5% CPU
  112.       unused! WOW, I thought, not much gain. but in fact since both DVMON
  113.       and JOVE now give the CPU when not needed, OTHER applications can in
  114.       fact get nearly 100% of the CPU (less the 3% overhead for DVMON and
  115.       the small overhead for JOVE's idle loop). The sad news is that DVMON
  116.       can't detect that the other applications are DESQview aware, and that
  117.       the current %unused isn't really the amount of CPU available to other
  118.       applications. (This is why I call it % UNUSED instead of % AVAIL-
  119.       ABLE!). Anyway, it's neat to watch the number change, anyway.
  120.       
  121.  
  122.       INSTALLATION
  123.  
  124.       Install as with any other Desqview application program. A PIF
  125.       file, for DV 2.0, is included to make it easy. A copy is attached.
  126.  
  127.       The screen size is the minimum required to run DVMON, and shouldn't be
  128.       reduced (you can increase it, but you probably don't want to). The PIF
  129.       file tries to put this monitor at the lower right-hand corner of the
  130.       EGA monitor in 43-line mode. You may wish to change this.
  131.       
  132.  
  133.       COPY OF CHANGE A PROGRAM SCREENS
  134.  
  135.                                Change a Program
  136.  
  137.  Program Name............: Performance Monitor
  138.  
  139.  Keys to Use on Open Menu: PM                         Memory Size (in K):   9
  140.  
  141.  Program...: c:\dv\dvmon.exe
  142.  
  143.  Parameters:
  144.  
  145.  Directory.: 
  146.  
  147.  Options:
  148.                      Writes directly to screen......: [N]
  149.                      Displays graphics information..: [N]
  150.                      Can be swapped out of memory...: [N]
  151.                      Requires floppy diskette.......: [N]
  152.  
  153.                       Change a Program Advanced Options
  154.  
  155.  System Memory (in K).......:   0   Maximum Program Memory Size (in K)..:
  156.  
  157.  Script Buffer Size.......:     0   Maximum Expanded Memory Size (in K):
  158.  
  159.  Text Pages: 1  Graphics Pages: 0   Initial Mode:        Interrupts: 00 to FF
  160.  
  161.  Window Position:
  162.     Maximum Height:   2       Starting Height:   2       Starting Row...:  41
  163.     Maximum Width.:  25       Starting Width.:  24       Starting Column:  55
  164.  
  165.                                 Shared Program
  166.  Pathname..:
  167.  
  168.  Data......:
  169.  
  170.  Options:
  171.     Close on exit to DOS.........: [Y]      Uses its own colors.........: [N]
  172.     Allow Close Window command...: [Y]      Runs only in foreground.....: [N]
  173.     Uses math coprocessor........: [N]      Keyboard conflict (0-4).....: [4]
  174. 
  175.